#include "StdAfx.h"
#include "BieuThucChia.h"


BieuThucChia::BieuThucChia()
{

}

BieuThucChia::BieuThucChia(BieuThuc BTa,BieuThuc BTb)
{
	BT1 = BTa;
	BT2 = BTa;
}
double BieuThucChia::TinhGiaTri()
{
	return (BT1.TinhGiaTri()/BT2.TinhGiaTri());
}

BieuThuc BieuThucChia::TinhDaoHam()
{
	BieuThuc KQ1, KQ2;
	KQ1 = BT1.TinhDaoHam();
	KQ2 = BT2.TinhDaoHam();
	BieuThucTich BTa, BTb;
	BTa.BT1 = BT1.TinhDaoHam();
	BTa.BT2 = BT2;
	BTb.BT1 = BT1;
	BTb.BT2 = BT2.TinhDaoHam();
	BieuThucTong TuThuc;
	TuThuc.BT1 = BTa;
	TuThuc.BT2 = BTb;
	BieuThucTich MauThuc;
	MauThuc.BT1 = BT2;
	MauThuc.BT2 = BT2;
	BieuThucChia KQ;
	TuThuc.Dau = 0;
	KQ.BT2 = MauThuc;
	KQ.BT1 = TuThuc;
	return KQ;
}
